<!--
File Upload Meter - DEMO and API
http://abhinavsingh.com/webdemos/fileuploadmeter/fileuploadmeter.rar
http://abhinavsingh.com/blog/2008/08/how-to-create-an-upload-meter-in-php-explained/
Developer : Abhinav Singh
Contact : admin@abhinavsingh.com
Date : 29th August, 2008

NOTE: Kindly keep this part of the code untouched if you are using or copying the code from here. 
Thanks in advance,
Abhinav
-->
<?php
  $id = $_GET['id'];
  $status = apc_fetch('upload_'.$id);
  if($status['done'] == 0 && ($status['current'] < $status['total'])) {
    $json = json_encode($status);
    echo $json;
  }
  else if($status['done'] == 1){
    echo "Success";
  }
  exit;
?>
